package com.woniu.atms.vo.pre.buyticket;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.*;
import java.time.LocalDate;
import java.util.List;

/**
 * 用户买票的数据视图
 */
@Getter
@Setter
public class BuyTicketVO {
    @NotNull(message = "非法token")
    @NotBlank(message = "非法token")
    @Size(min = 20,message = "非法token")
    private String token;//临时占位
    @NotNull(message = "班次id不能为null")
    @Min(value = 1,message = "班次id有误")
    private Integer scheduleId;
    @NotNull(message = "班次时间无效")
    private LocalDate date;
    @NotNull(message = "座位表不能为Null")
    @NotEmpty(message = "请至少选择一个座位")
    private List<Integer> setIds;
    @NotNull(message = "乘车人不能为Null")
    @NotEmpty(message = "请至少选择一个乘车人")
    private List<Integer> passengerIds;
}
